package exemple1;

public class Violon {

	String bois = "ebene";
	
	Violon ombre = null;
	
	Fabricant fab = null;
	
	Proprietaire prop = null;
	
	double taille = 0;
	
	
	
	String marque = "stradivarius";
	
	
	/**
	 * @param args
	 */
	public static void main(String[] args) {

		new Violon ();
	}
	
	public Violon() {
		super();
		System.out.println(this);
	}
	
	public Violon(String toto) {
		super();
		bois= toto;
		System.out.println(this);
	}
	
	public String getBois() {
		return bois;
	}

	public void setBois(String bois) {
		this.bois = bois;
	}

	public String toString () {
		return "violon fabrique en " + this.getBois();
	}
	
	public void setOmbre(Violon ombre){
		this.ombre=ombre;
	}

	public Fabricant getProp() {
		return fab;
	}

	public void setFab(Fabricant f) {
				
		/*if (this.prop != null)
			this.prop.v = null;
		if (prop != null) {
			prop.setV(null);
			prop.ajouterViolon(this);
		}*/
		this.fab=f;
	}
	
	public void setProp (Proprietaire prop) {
		
		if (this.prop != null)
			this.prop.v = null;
		if (prop != null) {
			prop.setV(null);
			prop.v = this;
		}
		this.prop = prop;
		
	}
	
}
